from gpiozero import Motor
import time

motor = Motor(2, 3)

for i in range(2000):
    motor.forward(1.0)
motor.stop()
time.sleep(2)
for i in range(2000):
    motor.backward(1.0)
motor.stop()
